package com.alibaba.gao.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;
/**
 * Spring Cloud Gateway整合JWT现统一认证和鉴权   https://blog.csdn.net/qq_41925205/article/details/114284614
 * @ClassName: ProductController
 * @Description: TODO
 * @author Luming
 * @date 2021-06-29 01:11:15
 * 
 * 
 * API服务
 * 
 */
@Slf4j
@RestController
@RequestMapping("product")
public class ProductController {
//    @GetMapping("/{id}")
//    public Map<String, Object> login(@PathVariable String id) {
//        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        HttpServletRequest request = servletRequestAttributes.getRequest();
//        String userStr = request.getHeader("user");
//        log.info("login user is " + userStr);
//        Map<String, Object> result = new HashMap<String, Object>();
//        result.put("200", "查询成功");
//        result.put("data", "dataObject");
//        return result;
//    }
}

